/*
 * Copyright(c) 2020-2100 万达信息股份有限公司 版权所有
 * WONDERS INFORMATION CO., LTD. ALL RIGHTS RESERVED.
 */

package com.wondersgroup.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author: huym
 * @version: 1.0
 * @date: 2020/11/18
 */
@RestController
public class ProductController {

    @Value("${server.port}")
    private int port;

    @GetMapping("/product/showMsg")
    public String showMsg(){
        return "商品服务，端口："+port;
    }

    @GetMapping("/product/findAll")
    public Map<String, Object> findAll(){
        Map<String, Object> map = new HashMap<>();
        map.put("status", "ok");
        map.put("msg","查询所有商品，端口："+port);
        return map;
    }

}
